how to log pygame events with pygame